<?php
/**
 * @filesource /modules/user/Form/Login.php
 * @abstract Generate a Login form, where no lable is set
 *     see /modules/user/views/register/register.phtml for how the form is generated.
 */
class user_Form_Login extends Zend_Form
{

    protected $_noDecorator = array(
        'ViewHelper', 
        'Errors'
    );

    public function cluBuild()
    {
        // set the method for the display form to POST
        $this->setMethod('POST');
		$this->setAction($this->getView()->hvnUrl(array('action' => 'login'),'account')); 
		
        //username
		$username = new Zend_Form_Element_Text('name', array('disableLoadDefaultDecorators' => true,
                                                                 'required' => true));
        $username->addDecorators($this->_noDecorator);
        $this->addElement($username);

        // pass
        $pass = new Zend_Form_Element_Password('pass',  array('disableLoadDefaultDecorators' => true,
                                                                 'required' => true));
        $pass->addDecorators($this->_noDecorator);
        $this->addElement($pass);
        
        //submit
        // add the submit button
        $submit = new Zend_Form_Element_Submit('submit', array('disableLoadDefaultDecorators' => true, 
                                                               'label' => t(411) ));
        $submit->addDecorators($this->_noDecorator);
        $this->addElement($submit);
        
    }
    
}